<?php 

$installer = $this;
$installer->startSetup();

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');

$entityTypeId     = $setup->getEntityTypeId('customer');
$attributeSetId   = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);

$setup->addAttribute('customer', 'company', array(
    'input'         => 'text',
    'type'          => 'text',
    'label'         => 'Company',
    'visible'       => 1,
    'required'      => 0,
    'user_defined' => "",
    'sort_order'    => 47,
));

$setup->addAttributeToGroup(
 $entityTypeId,
 $attributeSetId,
 $attributeGroupId,
 'company',
 '42'  //sort_order
);

$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'company');
$oAttribute->setData('used_in_forms', array('adminhtml_customer'));
$oAttribute->save();
$installer->endSetup();

?>
